package com.zcxy.exception;

/**
 * 业务异常
 *
 * @author
 */
public class BusinessException extends RuntimeException {
    private static final long serialVersionUID = 1L;

    private String code;
    private Object[] params;

    public BusinessException(String code, Object... params) {
        super(code);
        this.code = code;
        this.params = params;
    }

    public BusinessException(Throwable throwable) {
        super(throwable);
        this.code = "comm.server.error";
    }

    public String getCode() {
        return code;
    }

    public Object[] getParams() {
        return params;
    }
}
